_gtk_widget_get_preferred_size_and_baseline (child,
&child_requisition, NULL, &child_baseline, NULL);
if (orientation == GTK_ORIENTATION_HORIZONTAL &&
- gtk_widget_get_valign_with_baseline (child) == GTK_ALIGN_BASELINE &&
+ gtk_widget_get_valign (child) == GTK_ALIGN_BASELINE &&
child_baseline != -1)
{
have_baseline = TRUE;
(*heights)[i] = -1;
if (orientation == GTK_ORIENTATION_HORIZONTAL &&
- gtk_widget_get_valign_with_baseline (child) == GTK_ALIGN_BASELINE &&
+ gtk_widget_get_valign (child) == GTK_ALIGN_BASELINE &&
child_baseline != -1)
{
(*baselines)[i] = child_baseline;
(*heights)[i] = child_requisition.height + ipad_h;
if (orientation == GTK_ORIENTATION_HORIZONTAL &&
- gtk_widget_get_valign_with_baseline (child) == GTK_ALIGN_BASELINE &&
+ gtk_widget_get_valign (child) == GTK_ALIGN_BASELINE &&
child_baseline != -1)
(*baselines)[i] = child_baseline;
}
sizes[i].natural_size = child_size;
if (private->orientation == GTK_ORIENTATION_HORIZONTAL &&
- gtk_widget_get_valign_with_baseline (child->widget) == GTK_ALIGN_BASELINE)
+ gtk_widget_get_valign (child->widget) == GTK_ALIGN_BASELINE)
{
int child_allocation_width;
int child_minimum_height, child_natural_height;
sizes[packing][i].natural_size = child_size;
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL &&
- gtk_widget_get_valign_with_baseline (child->widget) == GTK_ALIGN_BASELINE)
+ gtk_widget_get_valign (child->widget) == GTK_ALIGN_BASELINE)
{
gint child_allocation_width;
gint child_minimum_height, child_natural_height;
g_value_set_enum (value, gtk_widget_get_halign (widget));
break;
case PROP_VALIGN:
- g_value_set_enum (value, gtk_widget_get_valign_with_baseline (widget));
+ g_value_set_enum (value, gtk_widget_get_valign (widget));
break;
case PROP_MARGIN_START:
g_value_set_int (value, gtk_widget_get_margin_start (widget));
/* Never pass a baseline to a child unless it requested it.
This means containers don't have to manually check for this. */
if (baseline != -1 &&
- gtk_widget_get_valign_with_baseline (widget) != GTK_ALIGN_BASELINE)
+ gtk_widget_get_valign (widget) != GTK_ALIGN_BASELINE)
baseline = -1;
alloc_needed = priv->alloc_needed;
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_HALIGN]);
}
-/**
- * gtk_widget_get_valign_with_baseline:
- * @widget: a #GtkWidget
- *
- * Gets the value of the #GtkWidget:valign property, including
- * %GTK_ALIGN_BASELINE.
- *
- * Returns: the vertical alignment of @widget
- *
- * Since: 3.10
- */
-GtkAlign
-gtk_widget_get_valign_with_baseline (GtkWidget *widget)
-{
- g_return_val_if_fail (GTK_IS_WIDGET (widget), GTK_ALIGN_FILL);
- return widget->priv->valign;
-}
-
/**
* gtk_widget_get_valign:
* @widget: a #GtkWidget
*
* Gets the value of the #GtkWidget:valign property.
*
- * For backwards compatibility reasons this method will never return
- * %GTK_ALIGN_BASELINE, but instead it will convert it to
- * %GTK_ALIGN_FILL. If your widget want to support baseline aligned
- * children it must use gtk_widget_get_valign_with_baseline(), or
- * `g_object_get (widget, "valign", &value, NULL)`, which will
- * also report the true value.
- *
- * Returns: the vertical alignment of @widget, ignoring baseline alignment
+ * Returns: the vertical alignment of @widget
*/
GtkAlign
gtk_widget_get_valign (GtkWidget *widget)
{
- GtkAlign align;
+ g_return_val_if_fail (GTK_IS_WIDGET (widget), GTK_ALIGN_FILL);
- align = gtk_widget_get_valign_with_baseline (widget);
- if (align == GTK_ALIGN_BASELINE)
- return GTK_ALIGN_FILL;
- return align;
+ return widget->priv->valign;
}
/**